package com.opesoft.calendar;

import java.util.Calendar;

import junit.framework.TestCase;

import org.apache.log4j.Logger;

public class MainTestCase extends TestCase
{
	Logger log=Logger.getLogger(this.getClass());

	public void test1()
	{
		Calendar c=Calendar.getInstance();
		log.debug("当前年份："+c.get(Calendar.YEAR));
		log.debug("当前月份："+c.get(Calendar.MONTH));
		log.debug("当前日期："+c.get(Calendar.DAY_OF_MONTH));
		log.debug("当前周几："+c.get(Calendar.DAY_OF_WEEK));
		log.debug("这个日期是这个月的第几个星期几："+c.get(Calendar.DAY_OF_WEEK_IN_MONTH));
		log.debug("当前在本月的第几周："+c.get(Calendar.WEEK_OF_MONTH));

		log.debug(c.getMaximum(Calendar.WEEK_OF_YEAR));
		log.debug(c.getMaximum(Calendar.WEEK_OF_MONTH));

		c.set(Calendar.YEAR,2001);
		c.set(Calendar.MONTH,3);
		System.out.println(c.getActualMaximum(Calendar.DAY_OF_MONTH));
		System.out.println(c.getActualMinimum(Calendar.DAY_OF_MONTH));
	}
}
